import * as types from './mutation-types';

const mutations = {
  [types.SET_SINGER] (state, singer) {
    state.singer = singer;
  },
  // 播放数据设置
  [types.SET_PLAYING_STATE] (state, flag) {
    state.playing = flag;
  },
  [types.SET_FULLSCREEN] (state, flag) {
    state.fullScreen = flag;
  },
  [types.SET_PLAYLIST] (state, list) {
    state.playList = list;
  },
  [types.SET_SEQUENCE_LIST] (state, list) {
    state.sequenceList = list;
  },
  [types.SET_PLAY_MODE] (state, mode) {
    state.mode = mode;
  },
  [types.SET_CURRENT_INDEX] (state, index) {
    state.currentIndex = index;
  },
  [types.SET_DISC] (state, disc) {
    state.disc = disc;
  },
  [types.SET_TOP_LIST] (state, toplist) {
    state.topList = toplist;
  },
  [types.SET_SEARCH_HISTORY] (state, historyList) {
    state.searchHistory = historyList;
  },
  [types.SET_PLAY_HISTORY] (state, list) {
    state.playHistory = list;
  },
  [types.SET_FAVORITE_LIST] (state, favlist) {
    state.favoriteList = favlist;
  }
};

export default mutations;
